home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-03-19 | 3.7 KB | 102 lines | [TEXT/MPS ] |
- #
- # ****************************************************************************
- #
- # File Name: Text.Lib
- #
- # Contains: xxx put contents here xxx
- #
- # Written by: KTA, KL, ML, GS et al
- #
- # Copyright: © 1993-1995 by Apple Computer, Inc., all rights reserved.
- #
- # ****************************************************************************
- # C h a n g e H i s t o r y (most recent first):
- # ****************************************************************************
- #
- # Vers Date Author Description
- # ---- -------- ------ ---------------------------------------------
- # <1.0.3> 1/9/95 KTA TypeParagraph() - Added pObjectNumber with default ''.
- # <1.0.2> 12/6/94 ML Added Exception Handling support
- # <1+> 5/21/93 NAGA Adding header and porting old files to follow new standards
- #
- # ****************************************************************************
- #
-
- ########################################################################
- # External libraries
- #=======================================================================
- Libraries "Font.Lib","String.Lib", "ExceptionHandling.Lib";
-
-
-
- #########################################################################
- # TypeWord(pNumChars := 'Random')
- #=======================================================================
- # Author: KTA
- # Description: Will type a string of random characters <pNumChars>
- # in length.
- # Parameters: pNumChars - Number of characters in the 'word' default
- # is random length from 1 to 10 characters.
- # Example: TypeWord();
- #=======================================================================
- # History:
- # ML 11/29/94 Added Exception Handling support
- #########################################################################
- TASK TypeWord(pNumChars := 'Random')
- begin
- if (pNumChars = 'Random')
- begin
- randomWord := RandomString(Random(1,10));
- _Type ({"{randomWord} "});
- end;
- end;
-
- #########################################################################
- # TypeSentence(pNumWords := 20)
- #=======================================================================
- # Author: KTA
- # Description: Will type a sentence of random character strings <pNumWords>
- # in length.
- # Parameters: pNumWords - Number of words in the sentence (default is 20)
- # Example: TypeSentence();
- #=======================================================================
- # History:
- # ML 11/29/94 Added Exception Handling support
- #########################################################################
- TASK TypeSentence(pNumWords := 20)
- begin
- for i := 1 to pNumWords
- TypeWord();
- punctuationList :={'!',',','.','?',':',';'};
- RandPunct := Random(1,(Card(punctuationList)));
- whichPunct := punctuationList[RandPunct];
- _Type ({whichPunct});
- end;
-
- #########################################################################
- # TypeParagraph(pNumSentences := 6)
- #=======================================================================
- # Author: KTA
- # Description: Will type a paragraph of sentences of random character strings <pNumSentences>
- # in length.
- # Parameters: pNumSentences - Number of sentences in the paragraph (default is 6)
- # Example: TypeParagraph();
- #=======================================================================
- # History:
- # ML 11/29/94 Added Exception Handling support
- # KTA 1/9/95 Added pObjectNumber with default ''
- #########################################################################
- TASK TypeParagraph(pNumSentences := 6, pObjectNumber := '')
- begin
- _Type ({tabKey});
- for i := 1 to pNumSentences
- begin
- if(pObjectNumber = '')
- pObjectNumber := i;
- SetFontParams(RandomFontRecords(), , pObjectNumber);
- TypeSentence();
- _Type ({" "});
- end;
- _Type ({returnKey, returnKey});
- end;
-